﻿namespace HRM.CORE
{
    using DevExpress.Utils;
    using DevExpress.XtraBars;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Repository;
    using DevExpress.XtraGrid;
    using DevExpress.XtraGrid.Columns;
    using DevExpress.XtraGrid.Views.Base;
    using DevExpress.XtraGrid.Views.Grid;
    using DevExpress.XtraTab;
    using APP.HELPER;
    using Common.Class; using APP.HELPER.Utils.Language; using Security.Security; using Dictionary.ERP;
    using Dictionary;
    using HRM.CORE;
    using HRM.CORE.CLASS;
    using HRM.CORE.REPORT;
    
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms; using Common;

    public class xucShiftOrder : Common.xucBase
    {
        private Bar bar1;
        private BarDockControl barDockControlBottom;
        private BarDockControl barDockControlLeft;
        private BarDockControl barDockControlRight;
        private BarDockControl barDockControlTop;
        private BarEditItem barEditItem1;
        private BarManager barManager1;
        private BarEditItem bbeMonth;
        private BarEditItem bbeShiftName;
        private BarEditItem bbeYear;
        private BarButtonItem bbiCheck;
        private BarButtonItem bbiClose;
        private BarButtonItem bbiCreate;
        private BarButtonItem bbiExport;
        private BarButtonItem bbiHoliday;
        private BarButtonItem bbiPrint;
        private BarButtonItem bbiRecal;
        private BarButtonItem bbiReload;
        private BarButtonItem bbiSave;
        private BarButtonItem bbiShift;
        private SimpleButton btAdvanceCheck;
        private SimpleButton btOK;
        private CheckEdit chbHoliday;
        private CheckEdit chbSaturday;
        private CheckEdit chbSunday;
        private CheckedListBoxControl clbShift;
        private Common.Class.clsAllOption clsAllOption;
        private GridColumn colAllDay;
        private GridColumn colDay1;
        private GridColumn colDay10;
        private GridColumn colDay11;
        private GridColumn colDay12;
        private GridColumn colDay13;
        private GridColumn colDay14;
        private GridColumn colDay15;
        private GridColumn colDay16;
        private GridColumn colDay17;
        private GridColumn colDay18;
        private GridColumn colDay19;
        private GridColumn colDay2;
        private GridColumn colDay20;
        private GridColumn colDay21;
        private GridColumn colDay22;
        private GridColumn colDay23;
        private GridColumn colDay24;
        private GridColumn colDay25;
        private GridColumn colDay26;
        private GridColumn colDay27;
        private GridColumn colDay28;
        private GridColumn colDay29;
        private GridColumn colDay3;
        private GridColumn colDay30;
        private GridColumn colDay31;
        private GridColumn colDay4;
        private GridColumn colDay5;
        private GridColumn colDay6;
        private GridColumn colDay7;
        private GridColumn colDay8;
        private GridColumn colDay9;
        private GridColumn colEmployeeCode;
        private GridColumn colFirstName;
        private GridColumn colLastName;
        private GridColumn colShift;
        private GridColumn colShiftCode;
        private IContainer components;
        public DataTable dt_Employees;
        public DataTable dt_TimekeeperShift;
        private GridView gbList;
        private GridControl gcList;
        public DevExpress.Utils.ImageCollection imageCollection2;
        private HRM_TIMEKEEPER l_TimeKeeper;
        private HRM_TIMEKEEPER_SHIFT l_TimeKeeperShift;
        private HRM_TIMEKEEPER_TABLELIST l_TimeKeeperTableList;
        private LabelControl labelControl1;
        private LabelControl lblState;
        private BarStaticItem lbMessage;
        private string m_Code;
        private string m_EmployeeCode;
        private string m_FirstName;
        private bool m_IsFinish;
        private bool m_IsLock;
        private bool m_IsSaveAll;
        private string m_LastName;
        private int m_Level;
        private int m_Month;
        private string m_ShiftCode;
        private Guid m_TimeKeeperTableListID;
        private int m_Year;
        private PanelControl pnInformation;
        private PictureBox ptFail;
        private RadioGroup rdOption;
        private RepositoryItemTimeEdit repMonth;
        private RepositoryItemComboBox repositoryItemComboBox3;
        private RepositoryItemProgressBar repositoryItemProgressBar1;
        private RepositoryItemTimeEdit repYear;
        private SplitContainerControl splitContainerControl1;
        private SplitContainerControl splitContainerControl2;
        private XtraTabControl xtraTabControl1;
        private XtraTabPage xtraTabPage1;
        private XtraTabPage xtraTabPage2;
        private xucOrganization xucOrganization1;

        public event SaveDataChangedHander SaveDataChanged;

        public xucShiftOrder()
        {
            this.components = null;
            this.m_TimeKeeperTableListID = Guid.Empty;
            this.m_EmployeeCode = "";
            this.m_FirstName = "";
            this.m_LastName = "";
            this.m_ShiftCode = "";
            this.m_Month = 0;
            this.m_Year = 0;
            this.m_IsLock = false;
            this.m_IsFinish = false;
            this.m_Level = MyLogin.Level;
            this.m_Code = MyLogin.Code;
            this.m_IsSaveAll = false;
            this.l_TimeKeeperShift = new HRM_TIMEKEEPER_SHIFT();
            this.l_TimeKeeperTableList = new HRM_TIMEKEEPER_TABLELIST();
            this.l_TimeKeeper = new HRM_TIMEKEEPER();
            this.dt_TimekeeperShift = new DataTable();
            this.dt_Employees = new DataTable();
            this.clsAllOption = new Common.Class.clsAllOption();
            this.InitializeComponent();
            this.InitMultiLanguages();
            this.m_Month = this.clsAllOption.MonthDefault.Month;
            this.m_Year = this.clsAllOption.MonthDefault.Year;
            base.Load += new EventHandler(this.xucShiftOrder_Load);
        }

        public xucShiftOrder(int Month, int Year)
        {
            this.components = null;
            this.m_TimeKeeperTableListID = Guid.Empty;
            this.m_EmployeeCode = "";
            this.m_FirstName = "";
            this.m_LastName = "";
            this.m_ShiftCode = "";
            this.m_Month = 0;
            this.m_Year = 0;
            this.m_IsLock = false;
            this.m_IsFinish = false;
            this.m_Level = MyLogin.Level;
            this.m_Code = MyLogin.Code;
            this.m_IsSaveAll = false;
            this.l_TimeKeeperShift = new HRM_TIMEKEEPER_SHIFT();
            this.l_TimeKeeperTableList = new HRM_TIMEKEEPER_TABLELIST();
            this.l_TimeKeeper = new HRM_TIMEKEEPER();
            this.dt_TimekeeperShift = new DataTable();
            this.dt_Employees = new DataTable();
            this.clsAllOption = new Common.Class.clsAllOption();
            this.InitializeComponent();
            this.InitMultiLanguages();
            this.m_Month = Month;
            this.m_Year = Year;
            base.Load += new EventHandler(this.xucShiftOrder_Load);
        }

        private void bbiCheck_ItemClick(object sender, ItemClickEventArgs e)
        {
            if ((this.m_Month != 0) && (this.m_Year != 0))
            {
                xfmShiftCheckOption option = new xfmShiftCheckOption(this.m_Month, this.m_Year);
                option.UnShiftData += new xfmShiftCheckOption.UnShiftDataHandler(this.xfmShiftCheckOption_UnShiftData);
                option.ShowDialog();
            }
            else
            {
                XtraMessageBox.Show("Vui l\x00f2ng chọn th\x00e1ng chấm c\x00f4ng tương ứng!", "Th\x00f4ng b\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }

        private void bbiClose_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (base.ParentForm != null)
            {
                base.ParentForm.Close();
            }
        }

        private void bbiCreate_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.Create();
            this.LoadGrid(this.m_Level, this.m_Code);
        }

        private void bbiExport_ItemClick(object sender, ItemClickEventArgs e)
        {
            base._exportView = this.gbList;
            SYS_LOG.Insert("Bảng Xếp Ca", "Xuất");
            base.Export();
        }

        private void bbiHoliday_ItemClick(object sender, ItemClickEventArgs e)
        {
            new xfmHoliday().ShowDialog();
        }

        private void bbiPrint_ItemClick(object sender, ItemClickEventArgs e)
        {
            new xfmOptionPrintShiftOrder(this.m_Level, this.m_Code, this.m_Month, this.m_Year).ShowDialog();
        }

        private void bbiRecal_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.Save();
            this.Create();
            this.LoadGrid(this.m_Level, this.m_Code);
        }

        private void bbiReload_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.Reload();
        }

        private void bbiSave_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.Save();
        }

        private void bbiShift_ItemClick(object sender, ItemClickEventArgs e)
        {
            xfmShift shift = new xfmShift();
            shift.Added += delegate (object o, DIC_SHIFT i) {
                if (this.m_TimeKeeperTableListID != Guid.Empty)
                {
                    this.Reload();
                }
            };
            shift.Updated += delegate (object o, DIC_SHIFT i) {
                if (this.m_TimeKeeperTableListID != Guid.Empty)
                {
                    this.Reload();
                }
            };
            shift.Deleted += delegate (object o, Common.Class.RowClickEventArgs i) {
                if (this.m_TimeKeeperTableListID != Guid.Empty)
                {
                    this.Reload();
                }
            };
            shift.ShowDialog();
        }

        private void btAdvanceCheck_Click(object sender, EventArgs e)
        {
            if ((this.m_Month != 0) && (this.m_Year != 0))
            {
                xfmShiftCheckOption option = new xfmShiftCheckOption(this.m_Month, this.m_Year);
                option.UnShiftData += new xfmShiftCheckOption.UnShiftDataHandler(this.xfmShiftCheckOption_UnShiftData);
                option.ShowDialog();
            }
            else
            {
                XtraMessageBox.Show("Vui l\x00f2ng chọn th\x00e1ng chấm c\x00f4ng tương ứng!", "Th\x00f4ng b\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }

        private void btOK_Click(object sender, EventArgs e)
        {
            bool isCheck = true;
            if (this.rdOption.SelectedIndex == 0)
            {
                isCheck = true;
            }
            else
            {
                isCheck = false;
            }
            DataTable shiftTable = new DataTable();
            DataColumn column = new DataColumn("ShiftCode");
            shiftTable.Columns.Add(column);
            foreach (CheckedListBoxItem item in this.clbShift.Items)
            {
                if (item.CheckState == CheckState.Checked)
                {
                    shiftTable.Rows.Add(new object[] { item.Value.ToString() });
                }
            }
            if (shiftTable.Rows.Count > 0)
            {
                this.xfmShiftCheckOption_UnShiftData(this, isCheck, 1, 0x1f, 0, this.gbList.RowCount, true, true, shiftTable, this.chbSaturday.Checked, this.chbSunday.Checked, this.chbHoliday.Checked);
            }
            else
            {
                XtraMessageBox.Show("Bạn phải chọn \x00edt nhất 1 ca l\x00e0m việc từ danh s\x00e1ch", "Th\x00f4ng B\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
        }

        private void clbShift_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e)
        {
        }

        private void Create()
        {
            base.SetWaitDialogCaption("Đang khởi tạo dữ liệu...");
            if (!this.l_TimeKeeperTableList.Exist(this.m_Month, this.m_Year))
            {
                this.m_TimeKeeperTableListID = Guid.NewGuid();
                this.l_TimeKeeperTableList.Insert(this.m_TimeKeeperTableListID, "Th\x00e1ng " + this.m_Month.ToString() + "-" + this.m_Year.ToString(), this.m_Month, this.m_Year, false, false);
            }
            else
            {
                this.l_TimeKeeperTableList.Get(this.m_Month, this.m_Year);
                this.m_TimeKeeperTableListID = this.l_TimeKeeperTableList.TimeKeeperTableListID;
            }
            if (this.l_TimeKeeperShift.Create(this.m_Level, this.m_Code, this.m_TimeKeeperTableListID) != "OK")
            {
                this.DoHide();
            }
            else if (this.l_TimeKeeper.Create(this.m_Level, this.m_Code, this.m_TimeKeeperTableListID) != "OK")
            {
                this.DoHide();
            }
            else
            {
                this.DoHide();
                this.RaiseSaveDataChangedHander();
            }
        }

        private void CreateByShift(int Month, int Year)
        {
            base.SetWaitDialogCaption("Đang khởi tạo dữ liệu...");
            this.m_TimeKeeperTableListID = Guid.NewGuid();
            this.l_TimeKeeperTableList.Insert(this.m_TimeKeeperTableListID, "Th\x00e1ng " + this.m_Month.ToString() + "-" + this.m_Year.ToString(), this.m_Month, this.m_Year, false, false);
            if (!(this.l_TimeKeeperShift.CreateByShift(this.m_TimeKeeperTableListID, Month, Year) != "OK"))
            {
                this.l_TimeKeeper.Create(this.m_Level, this.m_Code, this.m_TimeKeeperTableListID);
                this.DoHide();
                this.RaiseSaveDataChangedHander();
            }
        }

        private string DayName(int Year, int Month, int Day)
        {
            try
            {
                System.DateTime time = new System.DateTime(Year, Month, Day);
                return (Day.ToString() + " " + time.DayOfWeek.ToString().Substring(0, 3));
            }
            catch
            {
                return Day.ToString();
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void gbList_CellValueChanged(object sender, CellValueChangedEventArgs e)
        {
            this.ValueChanged(e.RowHandle, this.m_ShiftCode, this.m_EmployeeCode, this.m_FirstName, this.m_LastName);
        }

        private void gbList_CellValueChanging(object sender, CellValueChangedEventArgs e)
        {
            if (e.Column == this.colAllDay)
            {
                for (int i = 5; i <= (this.gbList.Columns.Count - 1); i++)
                {
                    this.gbList.SetRowCellValue(e.RowHandle, this.gbList.Columns[i], e.Value);
                }
            }
        }

        private void gbList_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
        {
            if (e.RowHandle == -2147483648)
            {
                e.Handled = true;
                e.Painter.DrawObject(e.Info);
                Rectangle bounds = e.Bounds;
                e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(0x3f, 0xa5, 0xa5, 0)), bounds);
                bounds.Height--;
                bounds.Width--;
                e.Graphics.DrawRectangle(Pens.Blue, bounds);
            }
            int rowHandle = e.RowHandle;
            if (rowHandle >= 0)
            {
                rowHandle++;
                e.Info.DisplayText = rowHandle.ToString();
            }
        }

        private void gbList_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e)
        {
            try
            {
                this.m_EmployeeCode = this.gbList.GetFocusedRowCellValue(this.colEmployeeCode).ToString();
                this.m_FirstName = this.gbList.GetFocusedRowCellValue(this.colFirstName).ToString();
                this.m_LastName = this.gbList.GetFocusedRowCellValue(this.colLastName).ToString();
                this.m_ShiftCode = this.gbList.GetFocusedRowCellValue(this.colShiftCode).ToString();
            }
            catch
            {
            }
        }

        private void gcList_Click(object sender, EventArgs e)
        {
        }

        private void GridViewLock()
        {
            int numberDay = System.DateTime.DaysInMonth(this.m_Year, this.m_Month);
            this.ShowHideColumn(numberDay);
            for (int i = 1; i <= numberDay; i++)
            {
                this.gbList.Columns[i + 5].OptionsColumn.ReadOnly = true;
                this.gbList.Columns[i + 5].OptionsColumn.AllowEdit = false;
                System.DateTime date = new System.DateTime(this.m_Year, this.m_Month, i);
                clsTimeKeeperOption option = new clsTimeKeeperOption();
                if (date.DayOfWeek.ToString() == "Monday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.MondayColor;
                }
                else if (date.DayOfWeek.ToString() == "Tuesday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.TuesdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Wednesday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.WednesdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Thursday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.ThursdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Friday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.FridayColor;
                }
                else if (date.DayOfWeek.ToString() == "Saturday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.SaturdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Sunday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.SundayColor;
                }
                DIC_HOLIDAY dic_holiday = new DIC_HOLIDAY();
                if (dic_holiday.Exist(date))
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.HolidayColor;
                }
                this.gbList.Columns[i + 5].Caption = this.DayName(this.m_Year, this.m_Month, i);
            }
        }

        private void GridViewOpen()
        {
            int numberDay = System.DateTime.DaysInMonth(this.m_Year, this.m_Month);
            this.ShowHideColumn(numberDay);
            for (int i = 1; i <= numberDay; i++)
            {
                this.gbList.Columns[i + 5].OptionsColumn.ReadOnly = false;
                this.gbList.Columns[i + 5].OptionsColumn.AllowEdit = true;
                System.DateTime date = new System.DateTime(this.m_Year, this.m_Month, i);
                clsTimeKeeperOption option = new clsTimeKeeperOption();
                if (date.DayOfWeek.ToString() == "Monday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.MondayColor;
                }
                else if (date.DayOfWeek.ToString() == "Tuesday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.TuesdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Wednesday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.WednesdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Thursday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.ThursdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Friday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.FridayColor;
                }
                else if (date.DayOfWeek.ToString() == "Saturday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.SaturdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Sunday")
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.SundayColor;
                }
                DIC_HOLIDAY dic_holiday = new DIC_HOLIDAY();
                if (dic_holiday.Exist(date))
                {
                    this.gbList.Columns[i + 5].AppearanceCell.BackColor = option.HolidayColor;
                }
                this.gbList.Columns[i + 5].Caption = this.DayName(this.m_Year, this.m_Month, i);
            }
        }

        private void Init(int Month, int Year)
        {
            this.m_Month = Month;
            this.m_Year = Year;
            System.DateTime time = new System.DateTime(Year, Month, 1);
            this.bbeMonth.EditValue = time;
            this.bbeYear.EditValue = time;
            this.bbeShiftName.EditValue = string.Concat(new object[] { "Th\x00e1ng ", Month, " - ", Year });
            HRM_TIMEKEEPER_SHIFT hrm_timekeeper_shift = new HRM_TIMEKEEPER_SHIFT();
            this.dt_TimekeeperShift = hrm_timekeeper_shift.CreateNullDataTable();
            this.dt_Employees = hrm_timekeeper_shift.CreateNullEmployeesDataTable();
            this.LoadShift();
            this.LoadGrid(this.m_Level, this.m_Code);
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            SerializableAppearanceObject appearance = new SerializableAppearanceObject();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(xucShiftOrder));
            MenuButton button = new MenuButton();
            ItemCommand command = new ItemCommand();
            ItemCommand command2 = new ItemCommand();
            ItemCommand command3 = new ItemCommand();
            ItemCommand command4 = new ItemCommand();
            ItemCommand command5 = new ItemCommand();
            ItemCommand command6 = new ItemCommand();
            ItemCommand command7 = new ItemCommand();
            ItemCommand command8 = new ItemCommand();
            ItemCommand command9 = new ItemCommand();
            ItemCommand command10 = new ItemCommand();
            ItemCommand command11 = new ItemCommand();
            ItemCommand command12 = new ItemCommand();
            ItemCommand command13 = new ItemCommand();
            ItemCommand command14 = new ItemCommand();
            ItemCommand command15 = new ItemCommand();
            ItemCommand command16 = new ItemCommand();
            ItemCommand command17 = new ItemCommand();
            ItemCommand command18 = new ItemCommand();
            ItemCommand command19 = new ItemCommand();
            ItemCommand command20 = new ItemCommand();
            ItemCommand command21 = new ItemCommand();
            ItemCommand command22 = new ItemCommand();
            ItemCommand command23 = new ItemCommand();
            ItemCommand command24 = new ItemCommand();
            ItemCommand command25 = new ItemCommand();
            ItemCommand command26 = new ItemCommand();
            ItemCommand command27 = new ItemCommand();
            ItemCommand command28 = new ItemCommand();
            ItemCommand command29 = new ItemCommand();
            StyleFormatCondition condition = new StyleFormatCondition();
            this.colShift = new GridColumn();
            this.colShiftCode = new GridColumn();
            this.barManager1 = new BarManager(this.components);
            this.bar1 = new Bar();
            this.bbiCheck = new BarButtonItem();
            this.bbeMonth = new BarEditItem();
            this.repMonth = new RepositoryItemTimeEdit();
            this.bbeYear = new BarEditItem();
            this.repYear = new RepositoryItemTimeEdit();
            this.bbeShiftName = new BarEditItem();
            this.repositoryItemComboBox3 = new RepositoryItemComboBox();
            this.bbiCreate = new BarButtonItem();
            this.bbiRecal = new BarButtonItem();
            this.bbiSave = new BarButtonItem();
            this.bbiPrint = new BarButtonItem();
            this.bbiShift = new BarButtonItem();
            this.bbiHoliday = new BarButtonItem();
            this.bbiExport = new BarButtonItem();
            this.bbiReload = new BarButtonItem();
            this.bbiClose = new BarButtonItem();
            this.barDockControlTop = new BarDockControl();
            this.barDockControlBottom = new BarDockControl();
            this.barDockControlLeft = new BarDockControl();
            this.barDockControlRight = new BarDockControl();
            this.imageCollection2 = new DevExpress.Utils.ImageCollection(this.components);
            this.lbMessage = new BarStaticItem();
            this.barEditItem1 = new BarEditItem();
            this.repositoryItemProgressBar1 = new RepositoryItemProgressBar();
            this.xucOrganization1 = new xucOrganization();
            this.clbShift = new CheckedListBoxControl();
            this.gcList = new GridControl();
            this.gbList = new GridView();
            this.colEmployeeCode = new GridColumn();
            this.colFirstName = new GridColumn();
            this.colLastName = new GridColumn();
            this.colAllDay = new GridColumn();
            this.colDay1 = new GridColumn();
            this.colDay2 = new GridColumn();
            this.colDay3 = new GridColumn();
            this.colDay4 = new GridColumn();
            this.colDay5 = new GridColumn();
            this.colDay6 = new GridColumn();
            this.colDay7 = new GridColumn();
            this.colDay8 = new GridColumn();
            this.colDay9 = new GridColumn();
            this.colDay10 = new GridColumn();
            this.colDay11 = new GridColumn();
            this.colDay12 = new GridColumn();
            this.colDay13 = new GridColumn();
            this.colDay14 = new GridColumn();
            this.colDay15 = new GridColumn();
            this.colDay16 = new GridColumn();
            this.colDay17 = new GridColumn();
            this.colDay18 = new GridColumn();
            this.colDay19 = new GridColumn();
            this.colDay20 = new GridColumn();
            this.colDay21 = new GridColumn();
            this.colDay22 = new GridColumn();
            this.colDay23 = new GridColumn();
            this.colDay24 = new GridColumn();
            this.colDay25 = new GridColumn();
            this.colDay26 = new GridColumn();
            this.colDay27 = new GridColumn();
            this.colDay28 = new GridColumn();
            this.colDay29 = new GridColumn();
            this.colDay30 = new GridColumn();
            this.colDay31 = new GridColumn();
            this.splitContainerControl1 = new SplitContainerControl();
            this.splitContainerControl2 = new SplitContainerControl();
            this.labelControl1 = new LabelControl();
            this.btAdvanceCheck = new SimpleButton();
            this.btOK = new SimpleButton();
            this.rdOption = new RadioGroup();
            this.xtraTabControl1 = new XtraTabControl();
            this.xtraTabPage1 = new XtraTabPage();
            this.xtraTabPage2 = new XtraTabPage();
            this.chbSunday = new CheckEdit();
            this.chbSaturday = new CheckEdit();
            this.chbHoliday = new CheckEdit();
            this.pnInformation = new PanelControl();
            this.lblState = new LabelControl();
            this.ptFail = new PictureBox();
            this.barManager1.BeginInit();
            this.repMonth.BeginInit();
            this.repYear.BeginInit();
            this.repositoryItemComboBox3.BeginInit();
            this.imageCollection2.BeginInit();
            this.repositoryItemProgressBar1.BeginInit();
            ((ISupportInitialize) this.clbShift).BeginInit();
            this.gcList.BeginInit();
            this.gbList.BeginInit();
            this.splitContainerControl1.BeginInit();
            this.splitContainerControl1.SuspendLayout();
            this.splitContainerControl2.BeginInit();
            this.splitContainerControl2.SuspendLayout();
            this.rdOption.Properties.BeginInit();
            this.xtraTabControl1.BeginInit();
            this.xtraTabControl1.SuspendLayout();
            this.xtraTabPage1.SuspendLayout();
            this.xtraTabPage2.SuspendLayout();
            this.chbSunday.Properties.BeginInit();
            this.chbSaturday.Properties.BeginInit();
            this.chbHoliday.Properties.BeginInit();
            this.pnInformation.BeginInit();
            this.pnInformation.SuspendLayout();
            ((ISupportInitialize) this.ptFail).BeginInit();
            base.SuspendLayout();
            this.colShift.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colShift.AppearanceHeader.Options.UseFont = true;
            this.colShift.Caption = "Ca";
            this.colShift.FieldName = "ShiftName";
            this.colShift.Fixed = FixedStyle.Left;
            this.colShift.Name = "colShift";
            this.colShift.OptionsColumn.AllowEdit = false;
            this.colShift.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colShift.OptionsColumn.ReadOnly = true;
            this.colShift.Visible = true;
            this.colShift.VisibleIndex = 3;
            this.colShift.Width = 0x2c;
            this.colShiftCode.Caption = "M\x00e3 ca l\x00e0m việc";
            this.colShiftCode.FieldName = "ShiftCode";
            this.colShiftCode.Name = "colShiftCode";
            this.barManager1.Bars.AddRange(new Bar[] { this.bar1 });
            this.barManager1.DockControls.Add(this.barDockControlTop);
            this.barManager1.DockControls.Add(this.barDockControlBottom);
            this.barManager1.DockControls.Add(this.barDockControlLeft);
            this.barManager1.DockControls.Add(this.barDockControlRight);
            this.barManager1.Form = this;
            this.barManager1.Images = this.imageCollection2;
            this.barManager1.Items.AddRange(new BarItem[] { this.bbiSave, this.bbiShift, this.bbeShiftName, this.lbMessage, this.bbeMonth, this.bbeYear, this.barEditItem1, this.bbiHoliday, this.bbiReload, this.bbiClose, this.bbiPrint, this.bbiCreate, this.bbiExport, this.bbiRecal, this.bbiCheck });
            this.barManager1.MaxItemId = 0x1b;
            this.barManager1.RepositoryItems.AddRange(new RepositoryItem[] { this.repositoryItemComboBox3, this.repMonth, this.repYear, this.repositoryItemProgressBar1 });
            this.bar1.BarName = "Tools";
            this.bar1.DockCol = 0;
            this.bar1.DockRow = 0;
            this.bar1.DockStyle = BarDockStyle.Top;
            this.bar1.LinksPersistInfo.AddRange(new LinkPersistInfo[] { new LinkPersistInfo(this.bbiCheck), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeMonth, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeYear, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeShiftName, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiCreate, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiRecal, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiSave, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiPrint, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiShift, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiHoliday, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiExport, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiReload, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiClose, BarItemPaintStyle.CaptionGlyph) });
            this.bar1.OptionsBar.DrawDragBorder = false;
            this.bar1.OptionsBar.UseWholeRow = true;
            this.bar1.Text = "Tools";
            this.bbiCheck.Caption = "Check";
            this.bbiCheck.Id = 0x1a;
            this.bbiCheck.ImageIndex = 0x27;
            this.bbiCheck.Name = "bbiCheck";
            this.bbiCheck.ItemClick += new ItemClickEventHandler(this.bbiCheck_ItemClick);
            this.bbeMonth.Caption = "Th\x00e1ng:";
            this.bbeMonth.Edit = this.repMonth;
            this.bbeMonth.Id = 14;
            this.bbeMonth.Name = "bbeMonth";
            this.repMonth.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repMonth.Appearance.Options.UseFont = true;
            this.repMonth.AutoHeight = false;
            this.repMonth.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.repMonth.Mask.EditMask = "MM";
            this.repMonth.Name = "repMonth";
            this.bbeYear.Caption = "Năm:";
            this.bbeYear.Edit = this.repYear;
            this.bbeYear.Id = 15;
            this.bbeYear.Name = "bbeYear";
            this.repYear.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repYear.Appearance.Options.UseFont = true;
            this.repYear.AutoHeight = false;
            this.repYear.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.repYear.Mask.EditMask = "yyyy";
            this.repYear.Name = "repYear";
            this.bbeShiftName.Caption = "T\x00ean Bảng Xếp Ca";
            this.bbeShiftName.Edit = this.repositoryItemComboBox3;
            this.bbeShiftName.Id = 12;
            this.bbeShiftName.Name = "bbeShiftName";
            this.bbeShiftName.Width = 120;
            this.repositoryItemComboBox3.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repositoryItemComboBox3.Appearance.Options.UseFont = true;
            this.repositoryItemComboBox3.AutoHeight = false;
            this.repositoryItemComboBox3.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo, "", -1, true, false, false, ImageLocation.MiddleCenter, null, new KeyShortcut(Keys.None), appearance, "", null, null, true) });
            this.repositoryItemComboBox3.Name = "repositoryItemComboBox3";
            this.repositoryItemComboBox3.ReadOnly = true;
            this.bbiCreate.Caption = "Tạo";
            this.bbiCreate.Id = 0x17;
            this.bbiCreate.ImageIndex = 6;
            this.bbiCreate.Name = "bbiCreate";
            this.bbiCreate.ItemClick += new ItemClickEventHandler(this.bbiCreate_ItemClick);
            this.bbiRecal.Caption = "Nạp Lại Danh S\x00e1ch Nh\x00e2n Vi\x00ean";
            this.bbiRecal.Id = 0x19;
            this.bbiRecal.ImageIndex = 0x21;
            this.bbiRecal.Name = "bbiRecal";
            this.bbiRecal.ItemClick += new ItemClickEventHandler(this.bbiRecal_ItemClick);
            this.bbiSave.Caption = "Lưu";
            this.bbiSave.Id = 10;
            this.bbiSave.ImageIndex = 10;
            this.bbiSave.Name = "bbiSave";
            this.bbiSave.ItemClick += new ItemClickEventHandler(this.bbiSave_ItemClick);
            this.bbiPrint.Caption = "In";
            this.bbiPrint.Id = 0x16;
            this.bbiPrint.ImageIndex = 9;
            this.bbiPrint.Name = "bbiPrint";
            this.bbiPrint.ItemClick += new ItemClickEventHandler(this.bbiPrint_ItemClick);
            this.bbiShift.Caption = "Ca L\x00e0m Việc";
            this.bbiShift.Id = 11;
            this.bbiShift.ImageIndex = 0x41;
            this.bbiShift.Name = "bbiShift";
            this.bbiShift.ItemClick += new ItemClickEventHandler(this.bbiShift_ItemClick);
            this.bbiHoliday.Caption = "Ng\x00e0y Nghỉ, Kỳ Nghỉ";
            this.bbiHoliday.Id = 0x13;
            this.bbiHoliday.ImageIndex = 0x1b;
            this.bbiHoliday.Name = "bbiHoliday";
            this.bbiHoliday.ItemClick += new ItemClickEventHandler(this.bbiHoliday_ItemClick);
            this.bbiExport.Caption = "Xuất";
            this.bbiExport.Id = 0x18;
            this.bbiExport.ImageIndex = 0x31;
            this.bbiExport.Name = "bbiExport";
            this.bbiExport.ItemClick += new ItemClickEventHandler(this.bbiExport_ItemClick);
            this.bbiReload.Caption = "Nạp Lại";
            this.bbiReload.Id = 20;
            this.bbiReload.ImageIndex = 0x2a;
            this.bbiReload.Name = "bbiReload";
            this.bbiReload.ItemClick += new ItemClickEventHandler(this.bbiReload_ItemClick);
            this.bbiClose.Caption = "Đ\x00f3ng";
            this.bbiClose.Id = 0x15;
            this.bbiClose.ImageIndex = 0x16;
            this.bbiClose.Name = "bbiClose";
            this.bbiClose.ItemClick += new ItemClickEventHandler(this.bbiClose_ItemClick);
            this.imageCollection2.ImageStream = (ImageCollectionStreamer) manager.GetObject("imageCollection2.ImageStream");
            this.imageCollection2.Images.SetKeyName(0x3d, "Vista (35).ico");
            this.imageCollection2.Images.SetKeyName(0x3e, "Security.ico");
            this.imageCollection2.Images.SetKeyName(0x3f, "RibbonPrintPreview_DocumentMapLarge.png");
            this.imageCollection2.Images.SetKeyName(0x40, "11.png");
            this.imageCollection2.Images.SetKeyName(0x41, "Sua.png");
            this.imageCollection2.Images.SetKeyName(0x42, "Them.png");
            this.imageCollection2.Images.SetKeyName(0x43, "PhanQuyen.png");
            this.imageCollection2.Images.SetKeyName(0x44, "11.png");
            this.imageCollection2.Images.SetKeyName(0x45, "plus.png");
            this.imageCollection2.Images.SetKeyName(70, "send.png");
            this.lbMessage.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.lbMessage.Appearance.ForeColor = Color.Red;
            this.lbMessage.Appearance.Options.UseFont = true;
            this.lbMessage.Appearance.Options.UseForeColor = true;
            this.lbMessage.Id = 13;
            this.lbMessage.Name = "lbMessage";
            this.lbMessage.TextAlignment = StringAlignment.Near;
            this.barEditItem1.Caption = "barEditItem1";
            this.barEditItem1.Edit = this.repositoryItemProgressBar1;
            this.barEditItem1.Id = 0x12;
            this.barEditItem1.Name = "barEditItem1";
            this.barEditItem1.Width = 100;
            this.repositoryItemProgressBar1.Name = "repositoryItemProgressBar1";
            this.xucOrganization1.Dock = DockStyle.Fill;
            this.xucOrganization1.IsClose = CloseOrNew.None;
            this.xucOrganization1.Location = new Point(0, 0);
            this.xucOrganization1.Name = "xucOrganization1";
            this.xucOrganization1.NotSave = false;
            command.Caption = "";
            command.Enable = false;
            command.Visibility = BarItemVisibility.Never;
            button.Add = command;
            command2.Caption = "";
            command2.Enable = false;
            command2.Visibility = BarItemVisibility.Never;
            button.Cancel = command2;
            command3.Caption = "";
            command3.Enable = false;
            command3.Visibility = BarItemVisibility.Never;
            button.Change = command3;
            command4.Caption = "";
            command4.Enable = false;
            command4.Visibility = BarItemVisibility.Never;
            button.Close = command4;
            command5.Caption = "";
            command5.Enable = false;
            command5.Visibility = BarItemVisibility.Never;
            button.Custom = command5;
            command6.Caption = "";
            command6.Enable = false;
            command6.Visibility = BarItemVisibility.Never;
            button.Delete = command6;
            command7.Caption = "";
            command7.Enable = false;
            command7.Visibility = BarItemVisibility.Never;
            button.Export = command7;
            command8.Caption = "";
            command8.Enable = false;
            command8.Visibility = BarItemVisibility.Never;
            button.Filter = command8;
            command9.Caption = "";
            command9.Enable = false;
            command9.Visibility = BarItemVisibility.Never;
            button.FilterCustomer = command9;
            command10.Caption = "";
            command10.Enable = false;
            command10.Visibility = BarItemVisibility.Never;
            button.FilterStock = command10;
            command11.Caption = "";
            command11.Enable = false;
            command11.Visibility = BarItemVisibility.Never;
            button.Find = command11;
            button.GClose = false;
            button.GCommand = false;
            button.GExport = false;
            command12.Caption = "";
            command12.Enable = false;
            command12.Visibility = BarItemVisibility.Never;
            button.Go = command12;
            button.GOption = false;
            button.GPrint = false;
            button.GRecords = false;
            button.GSearchBar = false;
            button.GSettings = false;
            button.GVaildation = false;
            command13.Caption = "";
            command13.Enable = false;
            command13.Visibility = BarItemVisibility.Never;
            button.Import = command13;
            command14.Caption = "";
            command14.Enable = false;
            command14.Visibility = BarItemVisibility.Never;
            button.Next = command14;
            command15.Caption = "";
            command15.Enable = false;
            command15.Visibility = BarItemVisibility.Never;
            button.PageSetup = command15;
            button.PHome = false;
            command16.Caption = "";
            command16.Enable = false;
            command16.Visibility = BarItemVisibility.Never;
            button.Previous = command16;
            command17.Caption = "";
            command17.Enable = false;
            command17.Visibility = BarItemVisibility.Never;
            button.Print = command17;
            command18.Caption = "";
            command18.Enable = false;
            command18.Visibility = BarItemVisibility.Never;
            button.PrintPreview = command18;
            button.PTool = false;
            command19.Caption = "";
            command19.Enable = false;
            command19.Visibility = BarItemVisibility.Never;
            button.Redo = command19;
            command20.Caption = "";
            command20.Enable = false;
            command20.Visibility = BarItemVisibility.Never;
            button.Refresh = command20;
            command21.Caption = "";
            command21.Enable = false;
            command21.Visibility = BarItemVisibility.Never;
            button.Save = command21;
            command22.Caption = "";
            command22.Enable = false;
            command22.Visibility = BarItemVisibility.Never;
            button.SaveAndClose = command22;
            command23.Caption = "";
            command23.Enable = false;
            command23.Visibility = BarItemVisibility.Never;
            button.SaveAndNew = command23;
            command24.Caption = "";
            command24.Enable = false;
            command24.Visibility = BarItemVisibility.Never;
            button.Search = command24;
            command25.Caption = "";
            command25.Enable = false;
            command25.Visibility = BarItemVisibility.Never;
            button.SearchText = command25;
            command26.Caption = "";
            command26.Enable = false;
            command26.Visibility = BarItemVisibility.Never;
            button.Task = command26;
            command27.Caption = "";
            command27.Enable = false;
            command27.Visibility = BarItemVisibility.Never;
            button.Undo = command27;
            command28.Caption = "";
            command28.Enable = false;
            command28.Visibility = BarItemVisibility.Never;
            button.Vaildate = command28;
            command29.Caption = "";
            command29.Enable = false;
            command29.Visibility = BarItemVisibility.Never;
            button.View = command29;
            this.xucOrganization1.RibbonBar = button;
            this.xucOrganization1.Size = new Size(0xf4, 0x11d);
            this.xucOrganization1.Status = Actions.None;
            this.xucOrganization1.TabIndex = 1;
            this.xucOrganization1.Title = "";
            this.clbShift.CheckOnClick = true;
            this.clbShift.Dock = DockStyle.Fill;
            this.clbShift.HighlightedItemStyle = HighlightStyle.Skinned;
            this.clbShift.HotTrackItems = true;
            this.clbShift.ItemHeight = 0x18;
            this.clbShift.Location = new Point(0, 0);
            this.clbShift.Name = "clbShift";
            this.clbShift.Size = new Size(0xed, 0x98);
            this.clbShift.TabIndex = 0;
            this.clbShift.ItemCheck += new DevExpress.XtraEditors.Controls.ItemCheckEventHandler(this.clbShift_ItemCheck);
            this.gcList.Dock = DockStyle.Fill;
            this.gcList.EmbeddedNavigator.Buttons.Append.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Edit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.EndEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Remove.Visible = false;
            this.gcList.EmbeddedNavigator.TextStringFormat = "{0}/{1}";
            this.gcList.Location = new Point(0, 0);
            this.gcList.MainView = this.gbList;
            this.gcList.Name = "gcList";
            this.gcList.Size = new Size(0x519, 0x23d);
            this.gcList.TabIndex = 6;
            this.gcList.UseEmbeddedNavigator = true;
            this.gcList.ViewCollection.AddRange(new BaseView[] { this.gbList });
            this.gcList.Click += new EventHandler(this.gcList_Click);
            this.gbList.Appearance.GroupRow.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.gbList.Appearance.GroupRow.Options.UseFont = true;
            this.gbList.Appearance.HeaderPanel.Options.UseTextOptions = true;
            this.gbList.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center;
            this.gbList.Appearance.HeaderPanel.TextOptions.WordWrap = WordWrap.Wrap;
            this.gbList.ColumnPanelRowHeight = 0x20;
            this.gbList.Columns.AddRange(new GridColumn[] { 
                this.colEmployeeCode, this.colFirstName, this.colLastName, this.colShiftCode, this.colShift, this.colAllDay, this.colDay1, this.colDay2, this.colDay3, this.colDay4, this.colDay5, this.colDay6, this.colDay7, this.colDay8, this.colDay9, this.colDay10, 
                this.colDay11, this.colDay12, this.colDay13, this.colDay14, this.colDay15, this.colDay16, this.colDay17, this.colDay18, this.colDay19, this.colDay20, this.colDay21, this.colDay22, this.colDay23, this.colDay24, this.colDay25, this.colDay26, 
                this.colDay27, this.colDay28, this.colDay29, this.colDay30, this.colDay31
             });
            this.gbList.FixedLineWidth = 1;
            this.gbList.FocusRectStyle = DrawFocusRectStyle.RowFocus;
            condition.Appearance.BackColor = Color.Ivory;
            condition.Appearance.Options.UseBackColor = true;
            condition.ApplyToRow = true;
            condition.Column = this.colShift;
            condition.Condition = FormatConditionEnum.Equal;
            condition.Value1 = "Trực đ\x00eam";
            this.gbList.FormatConditions.AddRange(new StyleFormatCondition[] { condition });
            this.gbList.GridControl = this.gcList;
            this.gbList.GroupPanelText = "K\x00e9o v\x00e0 Thả cột v\x00e0o đ\x00e2y để nh\x00f3m dữ liệu";
            this.gbList.IndicatorWidth = 40;
            this.gbList.Name = "gbList";
            this.gbList.OptionsBehavior.AllowIncrementalSearch = true;
            this.gbList.OptionsBehavior.AutoExpandAllGroups = true;
            this.gbList.OptionsBehavior.CopyToClipboardWithColumnHeaders = false;
            this.gbList.OptionsBehavior.FocusLeaveOnTab = true;
            this.gbList.OptionsCustomization.AllowFilter = false;
            this.gbList.OptionsCustomization.AllowSort = false;
            this.gbList.OptionsFilter.AllowColumnMRUFilterList = false;
            this.gbList.OptionsFilter.AllowFilterEditor = false;
            this.gbList.OptionsFilter.AllowMRUFilterList = false;
            this.gbList.OptionsLayout.StoreAllOptions = true;
            this.gbList.OptionsLayout.StoreAppearance = true;
            this.gbList.OptionsMenu.EnableColumnMenu = false;
            this.gbList.OptionsMenu.EnableGroupPanelMenu = false;
            this.gbList.OptionsNavigation.EnterMoveNextColumn = true;
            this.gbList.OptionsSelection.InvertSelection = true;
            this.gbList.OptionsSelection.MultiSelect = true;
            this.gbList.OptionsView.AllowCellMerge = true;
            this.gbList.OptionsView.ColumnAutoWidth = false;
            this.gbList.OptionsView.ShowAutoFilterRow = true;
            this.gbList.OptionsView.ShowFilterPanelMode = ShowFilterPanelMode.Never;
            this.gbList.OptionsView.ShowGroupPanel = false;
            this.gbList.FocusedRowChanged += new FocusedRowChangedEventHandler(this.gbList_FocusedRowChanged);
            this.gbList.CustomDrawRowIndicator += new RowIndicatorCustomDrawEventHandler(this.gbList_CustomDrawRowIndicator);
            this.gbList.CellValueChanged += new CellValueChangedEventHandler(this.gbList_CellValueChanged);
            this.gbList.CellValueChanging += new CellValueChangedEventHandler(this.gbList_CellValueChanging);
            this.colEmployeeCode.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colEmployeeCode.AppearanceHeader.Options.UseFont = true;
            this.colEmployeeCode.Caption = "M\x00e3 nh\x00e2n vi\x00ean";
            this.colEmployeeCode.FieldName = "EmployeeCode";
            this.colEmployeeCode.Fixed = FixedStyle.Left;
            this.colEmployeeCode.Name = "colEmployeeCode";
            this.colEmployeeCode.OptionsColumn.AllowEdit = false;
            this.colEmployeeCode.OptionsColumn.ReadOnly = true;
            this.colEmployeeCode.Visible = true;
            this.colEmployeeCode.VisibleIndex = 0;
            this.colEmployeeCode.Width = 0x41;
            this.colFirstName.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colFirstName.AppearanceHeader.Options.UseFont = true;
            this.colFirstName.Caption = "Họ l\x00f3t";
            this.colFirstName.FieldName = "FirstName";
            this.colFirstName.Fixed = FixedStyle.Left;
            this.colFirstName.Name = "colFirstName";
            this.colFirstName.OptionsColumn.AllowEdit = false;
            this.colFirstName.OptionsColumn.ReadOnly = true;
            this.colFirstName.Visible = true;
            this.colFirstName.VisibleIndex = 1;
            this.colFirstName.Width = 100;
            this.colLastName.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colLastName.AppearanceHeader.Options.UseFont = true;
            this.colLastName.Caption = "T\x00ean";
            this.colLastName.FieldName = "LastName";
            this.colLastName.Fixed = FixedStyle.Left;
            this.colLastName.Name = "colLastName";
            this.colLastName.OptionsColumn.AllowEdit = false;
            this.colLastName.OptionsColumn.ReadOnly = true;
            this.colLastName.Visible = true;
            this.colLastName.VisibleIndex = 2;
            this.colLastName.Width = 0x30;
            this.colAllDay.Caption = "Tất Cả";
            this.colAllDay.FieldName = "AllDay";
            this.colAllDay.Fixed = FixedStyle.Left;
            this.colAllDay.Name = "colAllDay";
            this.colAllDay.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colAllDay.Visible = true;
            this.colAllDay.VisibleIndex = 4;
            this.colAllDay.Width = 0x24;
            this.colDay1.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay1.AppearanceCell.Options.UseBackColor = true;
            this.colDay1.Caption = "1";
            this.colDay1.FieldName = "D1";
            this.colDay1.Name = "colDay1";
            this.colDay1.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay1.OptionsColumn.ReadOnly = true;
            this.colDay1.Visible = true;
            this.colDay1.VisibleIndex = 5;
            this.colDay1.Width = 0x23;
            this.colDay2.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay2.AppearanceCell.Options.UseBackColor = true;
            this.colDay2.Caption = "2";
            this.colDay2.FieldName = "D2";
            this.colDay2.Name = "colDay2";
            this.colDay2.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay2.OptionsColumn.ReadOnly = true;
            this.colDay2.Visible = true;
            this.colDay2.VisibleIndex = 6;
            this.colDay2.Width = 0x23;
            this.colDay3.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay3.AppearanceCell.Options.UseBackColor = true;
            this.colDay3.Caption = "3";
            this.colDay3.FieldName = "D3";
            this.colDay3.Name = "colDay3";
            this.colDay3.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay3.OptionsColumn.ReadOnly = true;
            this.colDay3.Visible = true;
            this.colDay3.VisibleIndex = 7;
            this.colDay3.Width = 0x23;
            this.colDay4.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay4.AppearanceCell.Options.UseBackColor = true;
            this.colDay4.Caption = "4";
            this.colDay4.FieldName = "D4";
            this.colDay4.Name = "colDay4";
            this.colDay4.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay4.OptionsColumn.ReadOnly = true;
            this.colDay4.Visible = true;
            this.colDay4.VisibleIndex = 8;
            this.colDay4.Width = 0x23;
            this.colDay5.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay5.AppearanceCell.Options.UseBackColor = true;
            this.colDay5.Caption = "5";
            this.colDay5.FieldName = "D5";
            this.colDay5.Name = "colDay5";
            this.colDay5.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay5.OptionsColumn.ReadOnly = true;
            this.colDay5.Visible = true;
            this.colDay5.VisibleIndex = 9;
            this.colDay5.Width = 0x23;
            this.colDay6.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay6.AppearanceCell.Options.UseBackColor = true;
            this.colDay6.Caption = "6";
            this.colDay6.FieldName = "D6";
            this.colDay6.Name = "colDay6";
            this.colDay6.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay6.OptionsColumn.ReadOnly = true;
            this.colDay6.Visible = true;
            this.colDay6.VisibleIndex = 10;
            this.colDay6.Width = 0x23;
            this.colDay7.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay7.AppearanceCell.Options.UseBackColor = true;
            this.colDay7.Caption = "7";
            this.colDay7.FieldName = "D7";
            this.colDay7.Name = "colDay7";
            this.colDay7.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay7.OptionsColumn.ReadOnly = true;
            this.colDay7.Visible = true;
            this.colDay7.VisibleIndex = 11;
            this.colDay7.Width = 0x23;
            this.colDay8.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay8.AppearanceCell.Options.UseBackColor = true;
            this.colDay8.Caption = "8";
            this.colDay8.FieldName = "D8";
            this.colDay8.Name = "colDay8";
            this.colDay8.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay8.OptionsColumn.ReadOnly = true;
            this.colDay8.Visible = true;
            this.colDay8.VisibleIndex = 12;
            this.colDay8.Width = 0x23;
            this.colDay9.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay9.AppearanceCell.Options.UseBackColor = true;
            this.colDay9.Caption = "9";
            this.colDay9.FieldName = "D9";
            this.colDay9.Name = "colDay9";
            this.colDay9.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay9.OptionsColumn.ReadOnly = true;
            this.colDay9.Visible = true;
            this.colDay9.VisibleIndex = 13;
            this.colDay9.Width = 0x23;
            this.colDay10.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay10.AppearanceCell.Options.UseBackColor = true;
            this.colDay10.Caption = "10";
            this.colDay10.FieldName = "D10";
            this.colDay10.Name = "colDay10";
            this.colDay10.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay10.OptionsColumn.ReadOnly = true;
            this.colDay10.Visible = true;
            this.colDay10.VisibleIndex = 14;
            this.colDay10.Width = 0x23;
            this.colDay11.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay11.AppearanceCell.Options.UseBackColor = true;
            this.colDay11.Caption = "11";
            this.colDay11.FieldName = "D11";
            this.colDay11.Name = "colDay11";
            this.colDay11.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay11.OptionsColumn.ReadOnly = true;
            this.colDay11.Visible = true;
            this.colDay11.VisibleIndex = 15;
            this.colDay11.Width = 0x23;
            this.colDay12.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay12.AppearanceCell.Options.UseBackColor = true;
            this.colDay12.Caption = "12";
            this.colDay12.FieldName = "D12";
            this.colDay12.Name = "colDay12";
            this.colDay12.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay12.OptionsColumn.ReadOnly = true;
            this.colDay12.Visible = true;
            this.colDay12.VisibleIndex = 0x10;
            this.colDay12.Width = 0x23;
            this.colDay13.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay13.AppearanceCell.Options.UseBackColor = true;
            this.colDay13.Caption = "13";
            this.colDay13.FieldName = "D13";
            this.colDay13.Name = "colDay13";
            this.colDay13.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay13.OptionsColumn.ReadOnly = true;
            this.colDay13.Visible = true;
            this.colDay13.VisibleIndex = 0x11;
            this.colDay13.Width = 0x23;
            this.colDay14.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay14.AppearanceCell.Options.UseBackColor = true;
            this.colDay14.Caption = "14";
            this.colDay14.FieldName = "D14";
            this.colDay14.Name = "colDay14";
            this.colDay14.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay14.OptionsColumn.ReadOnly = true;
            this.colDay14.Visible = true;
            this.colDay14.VisibleIndex = 0x12;
            this.colDay14.Width = 0x23;
            this.colDay15.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay15.AppearanceCell.Options.UseBackColor = true;
            this.colDay15.Caption = "15";
            this.colDay15.FieldName = "D15";
            this.colDay15.Name = "colDay15";
            this.colDay15.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay15.OptionsColumn.ReadOnly = true;
            this.colDay15.Visible = true;
            this.colDay15.VisibleIndex = 0x13;
            this.colDay15.Width = 0x23;
            this.colDay16.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay16.AppearanceCell.Options.UseBackColor = true;
            this.colDay16.Caption = "16";
            this.colDay16.FieldName = "D16";
            this.colDay16.Name = "colDay16";
            this.colDay16.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay16.OptionsColumn.ReadOnly = true;
            this.colDay16.Visible = true;
            this.colDay16.VisibleIndex = 20;
            this.colDay16.Width = 0x23;
            this.colDay17.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay17.AppearanceCell.Options.UseBackColor = true;
            this.colDay17.Caption = "17";
            this.colDay17.FieldName = "D17";
            this.colDay17.Name = "colDay17";
            this.colDay17.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay17.OptionsColumn.ReadOnly = true;
            this.colDay17.Visible = true;
            this.colDay17.VisibleIndex = 0x15;
            this.colDay17.Width = 0x23;
            this.colDay18.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay18.AppearanceCell.Options.UseBackColor = true;
            this.colDay18.Caption = "18";
            this.colDay18.FieldName = "D18";
            this.colDay18.Name = "colDay18";
            this.colDay18.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay18.OptionsColumn.ReadOnly = true;
            this.colDay18.Visible = true;
            this.colDay18.VisibleIndex = 0x16;
            this.colDay18.Width = 0x23;
            this.colDay19.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay19.AppearanceCell.Options.UseBackColor = true;
            this.colDay19.Caption = "19";
            this.colDay19.FieldName = "D19";
            this.colDay19.Name = "colDay19";
            this.colDay19.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay19.OptionsColumn.ReadOnly = true;
            this.colDay19.Visible = true;
            this.colDay19.VisibleIndex = 0x17;
            this.colDay19.Width = 0x23;
            this.colDay20.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay20.AppearanceCell.Options.UseBackColor = true;
            this.colDay20.Caption = "20";
            this.colDay20.FieldName = "D20";
            this.colDay20.Name = "colDay20";
            this.colDay20.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay20.OptionsColumn.ReadOnly = true;
            this.colDay20.Visible = true;
            this.colDay20.VisibleIndex = 0x18;
            this.colDay20.Width = 0x23;
            this.colDay21.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay21.AppearanceCell.Options.UseBackColor = true;
            this.colDay21.Caption = "21";
            this.colDay21.FieldName = "D21";
            this.colDay21.Name = "colDay21";
            this.colDay21.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay21.OptionsColumn.ReadOnly = true;
            this.colDay21.Visible = true;
            this.colDay21.VisibleIndex = 0x19;
            this.colDay21.Width = 0x23;
            this.colDay22.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay22.AppearanceCell.Options.UseBackColor = true;
            this.colDay22.Caption = "22";
            this.colDay22.FieldName = "D22";
            this.colDay22.Name = "colDay22";
            this.colDay22.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay22.OptionsColumn.ReadOnly = true;
            this.colDay22.Visible = true;
            this.colDay22.VisibleIndex = 0x1a;
            this.colDay22.Width = 0x23;
            this.colDay23.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay23.AppearanceCell.Options.UseBackColor = true;
            this.colDay23.Caption = "23";
            this.colDay23.FieldName = "D23";
            this.colDay23.Name = "colDay23";
            this.colDay23.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay23.OptionsColumn.ReadOnly = true;
            this.colDay23.Visible = true;
            this.colDay23.VisibleIndex = 0x1b;
            this.colDay23.Width = 0x23;
            this.colDay24.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay24.AppearanceCell.Options.UseBackColor = true;
            this.colDay24.Caption = "24";
            this.colDay24.FieldName = "D24";
            this.colDay24.Name = "colDay24";
            this.colDay24.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay24.OptionsColumn.ReadOnly = true;
            this.colDay24.Visible = true;
            this.colDay24.VisibleIndex = 0x1c;
            this.colDay24.Width = 0x23;
            this.colDay25.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay25.AppearanceCell.Options.UseBackColor = true;
            this.colDay25.Caption = "25";
            this.colDay25.FieldName = "D25";
            this.colDay25.Name = "colDay25";
            this.colDay25.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay25.OptionsColumn.ReadOnly = true;
            this.colDay25.Visible = true;
            this.colDay25.VisibleIndex = 0x1d;
            this.colDay25.Width = 0x23;
            this.colDay26.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay26.AppearanceCell.Options.UseBackColor = true;
            this.colDay26.Caption = "26";
            this.colDay26.FieldName = "D26";
            this.colDay26.Name = "colDay26";
            this.colDay26.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay26.OptionsColumn.ReadOnly = true;
            this.colDay26.Visible = true;
            this.colDay26.VisibleIndex = 30;
            this.colDay26.Width = 0x23;
            this.colDay27.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay27.AppearanceCell.Options.UseBackColor = true;
            this.colDay27.Caption = "27";
            this.colDay27.FieldName = "D27";
            this.colDay27.Name = "colDay27";
            this.colDay27.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay27.OptionsColumn.ReadOnly = true;
            this.colDay27.Visible = true;
            this.colDay27.VisibleIndex = 0x1f;
            this.colDay27.Width = 0x23;
            this.colDay28.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay28.AppearanceCell.Options.UseBackColor = true;
            this.colDay28.Caption = "28";
            this.colDay28.FieldName = "D28";
            this.colDay28.Name = "colDay28";
            this.colDay28.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay28.OptionsColumn.ReadOnly = true;
            this.colDay28.Visible = true;
            this.colDay28.VisibleIndex = 0x20;
            this.colDay28.Width = 0x23;
            this.colDay29.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay29.AppearanceCell.Options.UseBackColor = true;
            this.colDay29.Caption = "29";
            this.colDay29.FieldName = "D29";
            this.colDay29.Name = "colDay29";
            this.colDay29.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay29.OptionsColumn.ReadOnly = true;
            this.colDay29.Visible = true;
            this.colDay29.VisibleIndex = 0x21;
            this.colDay29.Width = 0x23;
            this.colDay30.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay30.AppearanceCell.Options.UseBackColor = true;
            this.colDay30.Caption = "30";
            this.colDay30.FieldName = "D30";
            this.colDay30.Name = "colDay30";
            this.colDay30.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay30.OptionsColumn.ReadOnly = true;
            this.colDay30.Visible = true;
            this.colDay30.VisibleIndex = 0x22;
            this.colDay30.Width = 0x23;
            this.colDay31.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay31.AppearanceCell.Options.UseBackColor = true;
            this.colDay31.Caption = "31";
            this.colDay31.FieldName = "D31";
            this.colDay31.Name = "colDay31";
            this.colDay31.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay31.OptionsColumn.ReadOnly = true;
            this.colDay31.Visible = true;
            this.colDay31.VisibleIndex = 0x23;
            this.colDay31.Width = 0x23;
            this.splitContainerControl1.Dock = DockStyle.Fill;
            this.splitContainerControl1.Location = new Point(0, 0x3a);
            this.splitContainerControl1.Name = "splitContainerControl1";
            this.splitContainerControl1.Panel1.Controls.Add(this.splitContainerControl2);
            this.splitContainerControl1.Panel1.Text = "Panel1";
            this.splitContainerControl1.Panel2.Controls.Add(this.gcList);
            this.splitContainerControl1.Panel2.Text = "Panel2";
            this.splitContainerControl1.Size = new Size(0x613, 0x23d);
            this.splitContainerControl1.SplitterPosition = 0xf4;
            this.splitContainerControl1.TabIndex = 7;
            this.splitContainerControl1.Text = "splitContainerControl1";
            this.splitContainerControl2.Dock = DockStyle.Fill;
            this.splitContainerControl2.FixedPanel = SplitFixedPanel.None;
            this.splitContainerControl2.Horizontal = false;
            this.splitContainerControl2.Location = new Point(0, 0);
            this.splitContainerControl2.Name = "splitContainerControl2";
            this.splitContainerControl2.Panel1.Controls.Add(this.xucOrganization1);
            this.splitContainerControl2.Panel1.Text = "Panel1";
            this.splitContainerControl2.Panel2.Controls.Add(this.labelControl1);
            this.splitContainerControl2.Panel2.Controls.Add(this.btAdvanceCheck);
            this.splitContainerControl2.Panel2.Controls.Add(this.btOK);
            this.splitContainerControl2.Panel2.Controls.Add(this.rdOption);
            this.splitContainerControl2.Panel2.Controls.Add(this.xtraTabControl1);
            this.splitContainerControl2.Panel2.Text = "Panel2";
            this.splitContainerControl2.Size = new Size(0xf4, 0x23d);
            this.splitContainerControl2.SplitterPosition = 0x11d;
            this.splitContainerControl2.TabIndex = 0;
            this.splitContainerControl2.Text = "splitContainerControl2";
            this.labelControl1.Appearance.Font = new Font("Tahoma", 11f);
            this.labelControl1.Appearance.Options.UseFont = true;
            this.labelControl1.Location = new Point(4, 6);
            this.labelControl1.Name = "labelControl1";
            this.labelControl1.Size = new Size(0xa4, 0x12);
            this.labelControl1.TabIndex = 5;
            this.labelControl1.Text = "○ Đ\x00e1nh dấu chọn nhanh";
            this.btAdvanceCheck.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.btAdvanceCheck.ImageIndex = 0x41;
            this.btAdvanceCheck.ImageList = this.imageCollection2;
            this.btAdvanceCheck.Location = new Point(0x1d, 0xfb);
            this.btAdvanceCheck.Name = "btAdvanceCheck";
            this.btAdvanceCheck.Size = new Size(0x66, 0x17);
            this.btAdvanceCheck.TabIndex = 4;
            this.btAdvanceCheck.Text = "N\x00e2ng Cao...";
            this.btAdvanceCheck.Click += new EventHandler(this.btAdvanceCheck_Click);
            this.btOK.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.btOK.ImageIndex = 0x27;
            this.btOK.ImageList = this.imageCollection2;
            this.btOK.Location = new Point(0x89, 0xfb);
            this.btOK.Name = "btOK";
            this.btOK.Size = new Size(0x66, 0x17);
            this.btOK.TabIndex = 3;
            this.btOK.Text = "Đ\x00e1nh Dấu (>>)";
            this.btOK.Click += new EventHandler(this.btOK_Click);
            this.rdOption.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.rdOption.Location = new Point(0, 0x1f);
            this.rdOption.MenuManager = this.barManager1;
            this.rdOption.Name = "rdOption";
            this.rdOption.Properties.Items.AddRange(new RadioGroupItem[] { new RadioGroupItem(null, "Chọn"), new RadioGroupItem(null, "Bỏ Chọn") });
            this.rdOption.Size = new Size(0xf4, 0x1c);
            this.rdOption.TabIndex = 2;
            this.xtraTabControl1.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.xtraTabControl1.Location = new Point(0, 0x40);
            this.xtraTabControl1.Name = "xtraTabControl1";
            this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1;
            this.xtraTabControl1.Size = new Size(0xf4, 0xb5);
            this.xtraTabControl1.TabIndex = 1;
            this.xtraTabControl1.TabPages.AddRange(new XtraTabPage[] { this.xtraTabPage1, this.xtraTabPage2 });
            this.xtraTabPage1.Controls.Add(this.clbShift);
            this.xtraTabPage1.Name = "xtraTabPage1";
            this.xtraTabPage1.Size = new Size(0xed, 0x98);
            this.xtraTabPage1.Text = "Chọn ca l\x00e0m việc";
            this.xtraTabPage2.Controls.Add(this.chbSunday);
            this.xtraTabPage2.Controls.Add(this.chbSaturday);
            this.xtraTabPage2.Controls.Add(this.chbHoliday);
            this.xtraTabPage2.Name = "xtraTabPage2";
            this.xtraTabPage2.Size = new Size(0xed, 0x98);
            this.xtraTabPage2.Text = "Chọn theo ng\x00e0y";
            this.chbSunday.EditValue = true;
            this.chbSunday.Location = new Point(15, 90);
            this.chbSunday.MenuManager = this.barManager1;
            this.chbSunday.Name = "chbSunday";
            this.chbSunday.Properties.Caption = "Bỏ qua ng\x00e0y chủ nhật khi chọn theo ca";
            this.chbSunday.Size = new Size(0xdb, 0x13);
            this.chbSunday.TabIndex = 2;
            this.chbSaturday.Location = new Point(15, 0x38);
            this.chbSaturday.MenuManager = this.barManager1;
            this.chbSaturday.Name = "chbSaturday";
            this.chbSaturday.Properties.Caption = "Bỏ qua ng\x00e0y thứ 7 khi chọn theo ca";
            this.chbSaturday.Size = new Size(0xc5, 0x13);
            this.chbSaturday.TabIndex = 1;
            this.chbHoliday.EditValue = true;
            this.chbHoliday.Location = new Point(15, 0x15);
            this.chbHoliday.MenuManager = this.barManager1;
            this.chbHoliday.Name = "chbHoliday";
            this.chbHoliday.Properties.Caption = "Bỏ qua ng\x00e0y lễ khi chọn theo ca";
            this.chbHoliday.Size = new Size(0xc5, 0x13);
            this.chbHoliday.TabIndex = 0;
            this.pnInformation.Appearance.BackColor = Color.Transparent;
            this.pnInformation.Appearance.Options.UseBackColor = true;
            this.pnInformation.BorderStyle = BorderStyles.NoBorder;
            this.pnInformation.Controls.Add(this.lblState);
            this.pnInformation.Controls.Add(this.ptFail);
            this.pnInformation.Dock = DockStyle.Top;
            this.pnInformation.Location = new Point(0, 0x1a);
            this.pnInformation.Name = "pnInformation";
            this.pnInformation.Size = new Size(0x613, 0x20);
            this.pnInformation.TabIndex = 7;
            this.pnInformation.Visible = false;
            this.lblState.AllowHtmlString = true;
            this.lblState.Appearance.BackColor = Color.Transparent;
            this.lblState.Appearance.Font = new Font("Tahoma", 9f);
            this.lblState.Appearance.ForeColor = Color.Red;
            this.lblState.Appearance.Options.UseBackColor = true;
            this.lblState.Appearance.Options.UseFont = true;
            this.lblState.Appearance.Options.UseForeColor = true;
            this.lblState.Location = new Point(0x24, 9);
            this.lblState.Name = "lblState";
            this.lblState.Size = new Size(0x25f, 15);
            this.lblState.TabIndex = 0x13;
            this.lblState.Text = "(*) Kh\x00f4ng t\x00ecm thấy dữ liệu xếp ca của th\x00e1ng n\x00e0y. Vui l\x00f2ng nhấn n\x00fat tạo ở ph\x00eda tr\x00ean để ph\x00e1t sinh bảng xếp ca!";
            this.ptFail.BackColor = Color.Transparent;
            this.ptFail.Image = MsgResc.orca;
            this.ptFail.Location = new Point(3, 0);
            this.ptFail.Name = "ptFail";
            this.ptFail.Size = new Size(0x20, 0x20);
            this.ptFail.SizeMode = PictureBoxSizeMode.AutoSize;
            this.ptFail.TabIndex = 0x12;
            this.ptFail.TabStop = false;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.splitContainerControl1);
            base.Controls.Add(this.pnInformation);
            base.Controls.Add(this.barDockControlLeft);
            base.Controls.Add(this.barDockControlRight);
            base.Controls.Add(this.barDockControlBottom);
            base.Controls.Add(this.barDockControlTop);
            base.Name = "xucShiftOrder";
            base.Size = new Size(0x613, 0x277);
            this.barManager1.EndInit();
            this.repMonth.EndInit();
            this.repYear.EndInit();
            this.repositoryItemComboBox3.EndInit();
            this.imageCollection2.EndInit();
            this.repositoryItemProgressBar1.EndInit();
            ((ISupportInitialize) this.clbShift).EndInit();
            this.gcList.EndInit();
            this.gbList.EndInit();
            this.splitContainerControl1.EndInit();
            this.splitContainerControl1.ResumeLayout(false);
            this.splitContainerControl2.EndInit();
            this.splitContainerControl2.ResumeLayout(false);
            this.rdOption.Properties.EndInit();
            this.xtraTabControl1.EndInit();
            this.xtraTabControl1.ResumeLayout(false);
            this.xtraTabPage1.ResumeLayout(false);
            this.xtraTabPage2.ResumeLayout(false);
            this.chbSunday.Properties.EndInit();
            this.chbSaturday.Properties.EndInit();
            this.chbHoliday.Properties.EndInit();
            this.pnInformation.EndInit();
            this.pnInformation.ResumeLayout(false);
            this.pnInformation.PerformLayout();
            ((ISupportInitialize) this.ptFail).EndInit();
            base.ResumeLayout(false);
        }

        private void InitInterface()
        {
            if (!(this.m_IsLock || this.m_IsFinish))
            {
                this.GridViewOpen();
            }
            else if (!(!this.m_IsLock || this.m_IsFinish))
            {
                this.GridViewLock();
            }
            else if (!(this.m_IsLock || !this.m_IsFinish))
            {
                this.GridViewLock();
            }
            else if (this.m_IsLock && this.m_IsFinish)
            {
                this.GridViewLock();
            }
        }

        private void InitMultiLanguages()
        {
            this.bbeMonth.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "Month", this.bbeMonth.Caption);
            this.bbeYear.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "Year", this.bbeYear.Caption);
            this.bbeShiftName.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "ShiftOrderName", this.bbeShiftName.Caption);
            this.bbiShift.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "Shifts", this.bbiShift.Caption);
            this.bbiHoliday.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "Holiday", this.bbiHoliday.Caption);
            this.bbiCreate.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "Create", this.bbiCreate.Caption);
            this.bbiSave.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "Save", this.bbiSave.Caption);
            this.bbiPrint.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "Print", this.bbiPrint.Caption);
            this.bbiExport.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "Export", this.bbiExport.Caption);
            this.bbiReload.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "Refresh", this.bbiReload.Caption);
            this.bbiClose.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "Close", this.bbiClose.Caption);
            this.colEmployeeCode.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "EmployeeCode", this.colEmployeeCode.Caption);
            this.colFirstName.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "FirstName", this.colFirstName.Caption);
            this.colLastName.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "LastName", this.colLastName.Caption);
            this.colShift.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "Shifts", this.colShift.Caption);
            this.colAllDay.Caption = MultiLanguages.GetString("tbl_ShiftOrder", "All", this.colAllDay.Caption);
        }

        private bool IsExistEmployeesDataTable(DataTable Employees, string EmployeeCode)
        {
            bool flag = false;
            foreach (DataRow row in Employees.Rows)
            {
                if (row["EmployeeCode"].ToString() == EmployeeCode)
                {
                    flag = true;
                }
            }
            return flag;
        }

        private bool IsValidFilterByShift(bool IsFilterByShift, string ShiftCode, DataTable ShiftTable)
        {
            int num = 0;
            foreach (DataRow row in ShiftTable.Rows)
            {
                if (ShiftCode == row["ShiftCode"].ToString())
                {
                    num++;
                }
            }
            if (num == 0)
            {
                IsFilterByShift = false;
            }
            return IsFilterByShift;
        }

        private void LoadGrid(int Level, string Code)
        {
            if (!this.l_TimeKeeperTableList.Exist(this.m_Month, this.m_Year))
            {
                this.gcList.DataSource = null;
                xfmShiftOption option = new xfmShiftOption(this.m_Month, this.m_Year);
                option.Closed += new xfmShiftOption.ClosedHandler(this.xfmShiftOption_Closed);
                option.CreateNewDataChanged += new xfmShiftOption.CreateNewDataChangedHander(this.xfmShiftOption_CreateNewDataChanged);
                option.CreateOldDataChanged += new xfmShiftOption.CreateOldDataChangedHandler(this.xfmShiftOption_CreateOldDataChanged);
                option.ShowDialog();
            }
            else
            {
                this.bbiCreate.Visibility = BarItemVisibility.Never;
                this.bbiRecal.Visibility = BarItemVisibility.Always;
                this.pnInformation.Visible = false;
                this.l_TimeKeeperTableList.Get(this.m_Month, this.m_Year);
                this.m_IsLock = this.l_TimeKeeperTableList.IsLock;
                this.m_IsFinish = this.l_TimeKeeperTableList.IsFinish;
                this.InitInterface();
                this.m_TimeKeeperTableListID = this.l_TimeKeeperTableList.TimeKeeperTableListID;
                this.gcList.DataSource = this.l_TimeKeeperShift.GetList(Level, Code, this.m_TimeKeeperTableListID);
            }
        }

        private void LoadOrganization()
        {
            this.xucOrganization1.LoadData();
            this.xucOrganization1.Selected += delegate (object s, HRM.CORE.Organization o) {
                HRM_GROUP hrm_group = new HRM_GROUP();
                HRM_DEPARTMENT hrm_department = new HRM_DEPARTMENT();
                HRM_BRANCH hrm_branch = new HRM_BRANCH();
                if (o.Level == 0)
                {
                    this.LoadGrid(this.m_Level = 0, this.m_Code = "");
                }
                else if (o.Level == 1)
                {
                    this.LoadGrid(this.m_Level = 1, this.m_Code = o.BranchCode);
                }
                else if (o.Level == 2)
                {
                    this.LoadGrid(this.m_Level = 2, this.m_Code = o.DepartmentCode);
                }
                else if (o.Level == 3)
                {
                    this.LoadGrid(this.m_Level = 3, this.m_Code = o.GroupCode);
                }
            };
            this.xucOrganization1.Updated += o => this.xucOrganization1.LoadData();
        }

        private void LoadShift()
        {
            this.clbShift.Items.Clear();
            new DIC_SHIFT().AddCheckedListBox(this.clbShift);
        }

        private void RaiseSaveDataChangedHander()
        {
            if (this.SaveDataChanged != null)
            {
                this.SaveDataChanged(this);
            }
        }

        private void Reload()
        {
            this.LoadGrid(this.m_Level, this.m_Code);
            this.LoadShift();
            this.m_IsSaveAll = false;
            this.dt_TimekeeperShift.Rows.Clear();
            this.dt_Employees.Rows.Clear();
        }

        private void repMonth_EditValueChanged(object sender, EventArgs e)
        {
            this.Init(this.m_Month, this.m_Year);
        }

        private void repMonth_EditValueChanging(object sender, ChangingEventArgs e)
        {
            this.m_Month = Convert.ToDateTime(e.NewValue.ToString()).Month;
        }

        private void repYear_EditValueChanged(object sender, EventArgs e)
        {
            this.Init(this.m_Month, this.m_Year);
        }

        private void repYear_EditValueChanging(object sender, ChangingEventArgs e)
        {
            this.m_Year = Convert.ToDateTime(e.NewValue.ToString()).Year;
        }

        private void Save()
        {
            base.SetWaitDialogCaption("Đang lưu dữ liệu...");
            if (this.m_IsSaveAll)
            {
                for (int i = 0; i < this.gbList.RowCount; i++)
                {
                    base.SetWaitDialogCaption("Đang lưu..." + this.gbList.GetRowCellValue(i, this.colFirstName).ToString() + " " + this.gbList.GetRowCellValue(i, this.colLastName).ToString() + " (" + this.gbList.GetRowCellValue(i, this.colEmployeeCode).ToString() + ")");
                    this.l_TimeKeeperShift.Update(this.m_TimeKeeperTableListID, this.gbList.GetRowCellValue(i, this.colEmployeeCode).ToString(), this.gbList.GetRowCellValue(i, this.colShiftCode).ToString(), bool.Parse(this.gbList.GetRowCellValue(i, this.colAllDay).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay1).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay2).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay3).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay4).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay5).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay6).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay7).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay8).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay9).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay10).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay11).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay12).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay13).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay14).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay15).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay16).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay17).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay18).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay19).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay20).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay21).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay22).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay23).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay24).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay25).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay26).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay27).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay28).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay29).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay30).ToString()), bool.Parse(this.gbList.GetRowCellValue(i, this.colDay31).ToString()));
                    if (!this.IsExistEmployeesDataTable(this.dt_Employees, this.gbList.GetRowCellValue(i, this.colEmployeeCode).ToString()))
                    {
                        this.dt_Employees.Rows.Add(new object[] { this.gbList.GetRowCellValue(i, this.colEmployeeCode).ToString(), this.gbList.GetRowCellValue(i, this.colFirstName).ToString(), this.gbList.GetRowCellValue(i, this.colLastName).ToString() });
                    }
                }
                this.l_TimeKeeper.Create(this.m_TimeKeeperTableListID, this.dt_Employees);
            }
            else
            {
                foreach (DataRow row in this.dt_TimekeeperShift.Rows)
                {
                    base.SetWaitDialogCaption("Đang lưu..." + row["FirstName"].ToString() + " " + row["LastName"].ToString() + " (" + row["EmployeeCode"].ToString() + ")");
                    this.l_TimeKeeperShift.Update(this.m_TimeKeeperTableListID, row["EmployeeCode"].ToString(), row["ShiftCode"].ToString(), bool.Parse(row["AllDay"].ToString()), bool.Parse(row["D1"].ToString()), bool.Parse(row["D2"].ToString()), bool.Parse(row["D3"].ToString()), bool.Parse(row["D4"].ToString()), bool.Parse(row["D5"].ToString()), bool.Parse(row["D6"].ToString()), bool.Parse(row["D7"].ToString()), bool.Parse(row["D8"].ToString()), bool.Parse(row["D9"].ToString()), bool.Parse(row["D10"].ToString()), bool.Parse(row["D11"].ToString()), bool.Parse(row["D12"].ToString()), bool.Parse(row["D13"].ToString()), bool.Parse(row["D14"].ToString()), bool.Parse(row["D15"].ToString()), bool.Parse(row["D16"].ToString()), bool.Parse(row["D17"].ToString()), bool.Parse(row["D18"].ToString()), bool.Parse(row["D19"].ToString()), bool.Parse(row["D20"].ToString()), bool.Parse(row["D21"].ToString()), bool.Parse(row["D22"].ToString()), bool.Parse(row["D23"].ToString()), bool.Parse(row["D24"].ToString()), bool.Parse(row["D25"].ToString()), bool.Parse(row["D26"].ToString()), bool.Parse(row["D27"].ToString()), bool.Parse(row["D28"].ToString()), bool.Parse(row["D29"].ToString()), bool.Parse(row["D30"].ToString()), bool.Parse(row["D31"].ToString()));
                }
                this.l_TimeKeeper.Create(this.m_TimeKeeperTableListID, this.dt_Employees);
            }
            this.m_IsSaveAll = false;
            this.dt_TimekeeperShift.Rows.Clear();
            this.dt_Employees.Rows.Clear();
            this.DoHide();
            this.RaiseSaveDataChangedHander();
        }

        private GridColumn SetColumnFromDay(int Day)
        {
            GridColumn column = new GridColumn();
            if (Day == 1)
            {
                return this.colDay1;
            }
            if (Day == 2)
            {
                return this.colDay2;
            }
            if (Day == 3)
            {
                return this.colDay3;
            }
            if (Day == 4)
            {
                return this.colDay4;
            }
            if (Day == 5)
            {
                return this.colDay5;
            }
            if (Day == 6)
            {
                return this.colDay6;
            }
            if (Day == 7)
            {
                return this.colDay7;
            }
            if (Day == 8)
            {
                return this.colDay8;
            }
            if (Day == 9)
            {
                return this.colDay9;
            }
            if (Day == 10)
            {
                return this.colDay10;
            }
            if (Day == 11)
            {
                return this.colDay11;
            }
            if (Day == 12)
            {
                return this.colDay12;
            }
            if (Day == 13)
            {
                return this.colDay13;
            }
            if (Day == 14)
            {
                return this.colDay14;
            }
            if (Day == 15)
            {
                return this.colDay15;
            }
            if (Day == 0x10)
            {
                return this.colDay16;
            }
            if (Day == 0x11)
            {
                return this.colDay17;
            }
            if (Day == 0x12)
            {
                return this.colDay18;
            }
            if (Day == 0x13)
            {
                return this.colDay19;
            }
            if (Day == 20)
            {
                return this.colDay20;
            }
            if (Day == 0x15)
            {
                return this.colDay21;
            }
            if (Day == 0x16)
            {
                return this.colDay22;
            }
            if (Day == 0x17)
            {
                return this.colDay23;
            }
            if (Day == 0x18)
            {
                return this.colDay24;
            }
            if (Day == 0x19)
            {
                return this.colDay25;
            }
            if (Day == 0x1a)
            {
                return this.colDay26;
            }
            if (Day == 0x1b)
            {
                return this.colDay27;
            }
            if (Day == 0x1c)
            {
                return this.colDay28;
            }
            if (Day == 0x1d)
            {
                return this.colDay29;
            }
            if (Day == 30)
            {
                return this.colDay30;
            }
            return this.colDay31;
        }

        public void SetData(int Month, int Year)
        {
            this.m_Month = Month;
            this.m_Year = Year;
            this.Init(this.m_Month, this.m_Year);
        }

        private void ShowHideColumn(int NumberDay)
        {
            switch (NumberDay)
            {
                case 0x1c:
                    this.colDay28.Visible = true;
                    this.colDay29.Visible = false;
                    this.colDay30.Visible = false;
                    this.colDay31.Visible = false;
                    break;

                case 0x1d:
                    this.colDay28.Visible = true;
                    this.colDay29.Visible = true;
                    this.colDay30.Visible = false;
                    this.colDay31.Visible = false;
                    break;

                case 30:
                    this.colDay28.Visible = true;
                    this.colDay29.Visible = true;
                    this.colDay30.Visible = true;
                    this.colDay31.Visible = false;
                    break;

                case 0x1f:
                    this.colDay28.Visible = true;
                    this.colDay29.Visible = true;
                    this.colDay30.Visible = true;
                    this.colDay31.Visible = true;
                    break;
            }
        }

        private void ValueChanged(int RowHandle, string ShiftCode, string EmployeeCode, string FirstName, string LastName)
        {
            if (!this.m_IsSaveAll)
            {
                this.dt_TimekeeperShift.Rows.Add(new object[] { 
                    this.m_TimeKeeperTableListID, EmployeeCode, FirstName, LastName, ShiftCode, bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colAllDay).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay1).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay2).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay3).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay4).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay5).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay6).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay7).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay8).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay9).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay10).ToString()), 
                    bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay11).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay12).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay13).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay14).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay15).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay16).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay17).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay18).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay19).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay20).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay21).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay22).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay23).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay24).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay25).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay26).ToString()), 
                    bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay27).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay28).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay29).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay30).ToString()), bool.Parse(this.gbList.GetRowCellValue(RowHandle, this.colDay31).ToString())
                 });
                if (!this.IsExistEmployeesDataTable(this.dt_Employees, EmployeeCode))
                {
                    this.dt_Employees.Rows.Add(new object[] { EmployeeCode, FirstName, LastName });
                }
            }
        }

        private void xfmShiftCheckOption_UnShiftData(object sender, bool IsCheck, int FromDate, int ToDate, int FromRow, int ToRow, bool IsCheckAll, bool IsFilterByShift, DataTable ShiftTable, bool IsNotSaturday, bool IsNotSunday, bool IsNotHoliday)
        {
            try
            {
                int num;
                System.DateTime time;
                DIC_HOLIDAY dic_holiday;
                GridColumn column;
                int num2;
                if (IsCheckAll)
                {
                    for (num = FromDate; num <= ToDate; num++)
                    {
                        base.SetWaitDialogCaption("Đang thiết lập ng\x00e0y..." + num.ToString());
                        try
                        {
                            time = new System.DateTime(this.m_Year, this.m_Month, num);
                        }
                        catch
                        {
                            continue;
                        }
                        if ((!IsNotSaturday || (time.DayOfWeek.ToString() != "Saturday")) && (!IsNotSunday || (time.DayOfWeek.ToString() != "Sunday")))
                        {
                            if (IsNotHoliday)
                            {
                                dic_holiday = new DIC_HOLIDAY();
                                if (dic_holiday.Exist(time))
                                {
                                    continue;
                                }
                            }
                            column = this.SetColumnFromDay(num);
                            num2 = 0;
                            while (num2 < this.gbList.RowCount)
                            {
                                if (IsFilterByShift)
                                {
                                    if (this.IsValidFilterByShift(IsFilterByShift, this.gbList.GetRowCellValue(num2, this.colShiftCode).ToString(), ShiftTable))
                                    {
                                        this.gbList.SetRowCellValue(num2, column, IsCheck);
                                    }
                                }
                                else
                                {
                                    this.gbList.SetRowCellValue(num2, column, IsCheck);
                                }
                                num2++;
                            }
                            this.gcList.Refresh();
                        }
                    }
                    this.m_IsSaveAll = true;
                    this.dt_TimekeeperShift.Rows.Clear();
                    this.dt_Employees.Rows.Clear();
                }
                else
                {
                    for (num = FromDate; num <= ToDate; num++)
                    {
                        base.SetWaitDialogCaption("Đang thiết lập ng\x00e0y..." + num.ToString());
                        try
                        {
                            time = new System.DateTime(this.m_Year, this.m_Month, num);
                        }
                        catch
                        {
                            continue;
                        }
                        if ((!IsNotSaturday || (time.DayOfWeek.ToString() != "Saturday")) && (!IsNotSunday || (time.DayOfWeek.ToString() != "Sunday")))
                        {
                            if (IsNotHoliday)
                            {
                                dic_holiday = new DIC_HOLIDAY();
                                if (dic_holiday.Exist(time))
                                {
                                    continue;
                                }
                            }
                            column = this.SetColumnFromDay(num);
                            for (num2 = FromRow - 1; num2 <= (ToRow - 1); num2++)
                            {
                                if (IsFilterByShift)
                                {
                                    if (this.IsValidFilterByShift(IsFilterByShift, this.gbList.GetRowCellValue(num2, this.colShiftCode).ToString(), ShiftTable))
                                    {
                                        this.gbList.SetRowCellValue(num2, column, IsCheck);
                                    }
                                }
                                else
                                {
                                    this.gbList.SetRowCellValue(num2, column, IsCheck);
                                }
                                if (num == ToDate)
                                {
                                    this.ValueChanged(num2, this.gbList.GetRowCellValue(num2, this.colShiftCode).ToString(), this.gbList.GetRowCellValue(num2, this.colEmployeeCode).ToString(), this.gbList.GetRowCellValue(num2, this.colFirstName).ToString(), this.gbList.GetRowCellValue(num2, this.colLastName).ToString());
                                }
                            }
                            this.gcList.Refresh();
                        }
                    }
                }
                this.DoHide();
            }
            catch
            {
                this.DoHide();
            }
        }

        private void xfmShiftOption_Closed(object sender)
        {
            this.bbiCreate.Visibility = BarItemVisibility.Always;
            this.bbiRecal.Visibility = BarItemVisibility.Never;
            this.pnInformation.Visible = true;
        }

        private void xfmShiftOption_CreateNewDataChanged(object sender)
        {
            this.Create();
            this.LoadGrid(this.m_Level, this.m_Code);
        }

        private void xfmShiftOption_CreateOldDataChanged(object sender, int Month, int Year)
        {
            this.CreateByShift(Month, Year);
            this.LoadGrid(this.m_Level, this.m_Code);
        }

        private void xucShiftOrder_Load(object sender, EventArgs e)
        {
            this.repMonth.EditValueChanging += new ChangingEventHandler(this.repMonth_EditValueChanging);
            this.repMonth.EditValueChanged += new EventHandler(this.repMonth_EditValueChanged);
            this.repYear.EditValueChanging += new ChangingEventHandler(this.repYear_EditValueChanging);
            this.repYear.EditValueChanged += new EventHandler(this.repYear_EditValueChanged);
            this.Init(this.m_Month, this.m_Year);
            this.LoadOrganization();
        }

        public delegate void SaveDataChangedHander(object sender);
    }
}

